from flask import Flask
from flask import request
app = Flask(__name__)

@app.route('/')
def hello_world():
	return 'Hello World!'

@app.route('/hello3')
def hello():
	return 'Hello World 3333'

@app.route('/user/<username>')
def show_user_profile(username):
	# show the user profile for that user
	return 'User %s' % username

@app.route('/login', methods=['GET', 'POST'])
def login():
	if request.method == 'POST':
#		data = request.data #get body data from raw data
		data = request.values.to_dict() # get body data from form and unlencoded

		return str(data)
	else:
		#get request body
		data = request.values.to_dict()
		print data
		return str(data)

if __name__ == '__main__':
	app.run(host="192.168.199.242",port=8080,debug=True)